<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多行布局</title>

    <style>
 .nav {
            display: flex;
            width: 100%;
            height: 400px;
            background-color: lavender;
            flex-wrap: nowrap;
        }

      .item {
            width: 200px;
            height: 100px;
            margin: 10px;
            background-color: lightpink;
        }

        @media (max-width: 600px) {
          .item {
                flex-wrap: wrap;
            }
        }
    </style>
</head>
<body>
    <div class="nav">
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
</body>
</html>